package com.woniu.microuserserver.service.impl;

import com.woniu.microcommonsserver.entity.OrgInfoEntity;
import com.woniu.microuserserver.bean.DictBean;
import com.woniu.microuserserver.mapper.OrgMapper;
import com.woniu.microuserserver.service.OrgService;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OrgServiceimpl implements OrgService {
    @Resource
    private OrgMapper orgMapper;

    @Override
    public int addOrgPro_id(int oid, int pid) {
        int i = orgMapper.addOrgPro_id(oid, pid);
        return i;
    }

    @Override
    public int addOrg(OrgInfoEntity orgInfoEntity) {
        int i = orgMapper.addOrg(orgInfoEntity);
        return i;
    }

    @Override
    public OrgInfoEntity searchbyid(int id) {
        return orgMapper.searchbyid(id);
    }

    @Override
    public List<OrgInfoEntity> searchAllOrg() {
        return orgMapper.searchAllOrg();
    }

    @Override
    public int addDict(DictBean dictBean) {
        return orgMapper.addDict(dictBean);
    }

    @Override
    public List<DictBean> sd() {
        return orgMapper.sd();
    }

    @Override
    public int delDict(int id) {
        return orgMapper.delDict(id);
    }
}
